package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsUserMapper;
import com.qf.pojo.DtsUser;
import com.qf.vo.DayStatis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * projectName: wokepase1
 *
 * @author: 强力
 * time: 2021/9/13 16:53
 * description:
 */
@Service
public class UserServiceImpl implements  UserService{
@Autowired
private DtsUserMapper userMapper;
    @Override
    public Integer userCount() {
        QueryWrapper<DtsUser> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("deleted",0);
        Integer count = userMapper.selectCount(queryWrapper);
        return count;
    }

    @Override
    public List<DayStatis> recentCount(Integer dayAgo) {
        List<DayStatis> list = userMapper.statuisIncrUserCnt(dayAgo);

        return list;
    }

    @Override
    public List<Map> selectUser() {
        List<Map> list = userMapper.queryUserStat();
        return list ;
    }


}
